using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;
using System.Collections;
using System.Data;

namespace WebControls
{
    public class SFLabel:Label,IMultiLanguage
    {
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
        }
        #region IMultiLanguage Members

        public void SetControlLanguage()
        {
            string txt =StaticMethods.GetMultilanguageString(this);
            if(txt!="")
            {
                this.Text = txt;
            }
        }
        private bool _IsProtectedForLanguageChange = false;
        public bool IsProtectedForLanguageChange
        {
            get
            {
                return _IsProtectedForLanguageChange;
            }
            set
            {
                _IsProtectedForLanguageChange = value;
            }
        }

        private bool _IsMasterPageControl = false;
        public bool IsMasterPageControl
        {
            get
            {
                return _IsMasterPageControl;
            }
            set
            {
                _IsMasterPageControl = value;
            }
        }

        #endregion

        public override string Text
        {
            get
            {
                return base.Text;
            }
            set
            {
                if (value == null)
                    base.Text = "";
                else
                    base.Text = value;
            }
        }
        public string Value
        {
            get { return this.Text; }
            set { this.Text = value; }
        }
    }
}
